package com.aaa.security.handle;

import com.aaa.security.exception.PermissionException;
import com.aaa.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author 崔灿
 * @Date 2023/02/25 09:46
 * @ClassName MyExceptionHandler
 * @Description
 * @Version 1.0
 */

@RestControllerAdvice
public class MyExceptionHandler {
    @ExceptionHandler(value = PermissionException.class)
    public Result<String> handle01(PermissionException e){
        return new Result<>(4001,e.getMessage());
    }
}
